body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('../images/img_1.png'); /* 添加背景图片 */
    background-size: cover; /* 使背景图片覆盖整个页面 */
    background-position: center; /* 居中显示背景图片 */
    background-repeat: no-repeat; /* 防止背景图片重复 */
    background-attachment: fixed; /* 固定背景图片，不随滚动条滚动 */
}

header {
    background-color: rgba(51, 51, 51, 0.8); /* 添加半透明背景以便文字可读 */
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

.hero {
    background-color: rgba(244, 244, 244, 0.8); /* 添加半透明背景以便文字可读 */
    padding: 20px;
    text-align: center;
}

.product-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.product-item {
    border: 1px solid #ddd;
    margin: 10px;
    padding: 10px;
    width: 200px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8); /* 添加半透明背景以便文字可读 */
}

.product-item img {
    max-width: 100%;
    height: auto;
}

footer {
    background-color: rgba(51, 51, 51, 0.8); /* 添加半透明背景以便文字可读 */
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

.user-profile {
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 40px; /* 调整头像大小 */
    height: 40px; /* 调整头像大小 */
    border-radius: 50%;
}

.user-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.user-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.user-menu a:hover {
    background-color: #f1f1f1;
}

.user-profile:hover .user-menu {
    display: block;
}

.user-info {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: rgba(249, 249, 249, 0.8); /* 添加半透明背景以便文字可读 */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.user-info h2 {
    text-align: center;
    margin-bottom: 20px;
}

.user-info form {
    display: flex;
    flex-direction: column;
}

.user-info label {
    margin-bottom: 5px;
    font-weight: bold;
}

.user-info input[type="text"],
.user-info input[type="email"] {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.user-info .button-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.user-info input[type="submit"],
.user-info input[type="button"] {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100px; /* 设置按钮宽度 */
}

.user-info input[type="submit"] {
    background-color: #28a745;
    color: white;
}

.user-info input[type="submit"]:hover {
    background-color: #218838;
}

.user-info input[type="button"] {
    background-color: #007bff;
    color: white;
}

.user-info input[type="button"]:hover {
    background-color: #0056b3;
}

.message {
    text-align: center;
    margin-bottom: 20px;
}

.message.success {
    color: green;
}

.message.error {
    color: red;
}
